<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 流年 <liu21st@gmail.com>
// +----------------------------------------------------------------------

// 应用公共文件

// 快捷 Json 返回
function retJson($data = array(), $code = 200, $msg = ''){
    return json(['data' => $data, 'code' => $code, 'msg' => $msg]);
}
//返回错误信息数组
function retInfo($data = '', $retcode = 200, $msg = ''){
    $tmp_arr         = array();
    $tmp_arr['data'] = $data;
    $tmp_arr['code'] = $retcode;
    $tmp_arr['msg']  = $msg;
    return $tmp_arr;
}
